package com.weipai.springboot.module.controller;

import com.weipai.springboot.model.Apk;
import com.weipai.springboot.model.api.Response;
import com.weipai.springboot.module.service.ApkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @Author: lyh
 * @Date: 2019/3/1 11:51
 * @Version 1.0
 */
@RestController
public class ApkController {


    @Autowired
    private ApkService apkService;


    /**
     *  后台管理界面 apk 添加
     */
    @ResponseBody
    @RequestMapping(value = "/apk/addApk",method = RequestMethod.POST )
    public Response addApk( Apk apk){
        return  apkService.save(apk);
    }

    /**
     * 获取  最新版本号
     * @param
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/apk/getNewapkVersions")
    public Response getNewapkVersions(){
        return apkService.getNewapkVersions();
    }






}
